local evl_SpamFilter = {}

local hooks = {}
local lastMessage
local whiteList = {
	"/"
}

function evl_SpamFilter:UIErrorsFrame_OnEvent(message, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)
	if message == lastMessage then
		return
	end

	lastMessage = message
	
	if string.find(message, "/") then
		hooks["UIErrorsFrame_OnEvent"](event, message, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)
	else
		ChatFrame2:AddMessage(string.format('|cff%s%s|r', "ff0000", message))
	end
end

function evl_SpamFilter:new()
	hooks["UIErrorsFrame_OnEvent"] = UIErrorsFrame_OnEvent
	UIErrorsFrame_OnEvent = self.UIErrorsFrame_OnEvent
end

evl_SpamFilter:new()